#------------------------------------------------------------------------------
# definiendo fuentes para la libreria
#------------------------------------------------------------------------------
FILE(GLOB_RECURSE prog_headers "src/*.h")
FILE(GLOB_RECURSE prog_sources "*src/*.cpp")

###############################################################################
# Copiar archivos que estan en resources para poder ejecutar los programas
# 
###############################################################################
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/dummy_projects/resources)
file(COPY "${PROJECT_SOURCE_DIR}/resources/programs" DESTINATION "${PROJECT_BINARY_DIR}/dummy_projects/resources")

#------------------------------------------------------------------------------
# Atencion al orden en el que se insertan las librerias.
#------------------------------------------------------------------------------

SET(PROG_LIBS 	
	engine
	vfs
	utils
	log 
	physfs 
	core
	GL 
	GLU
	GLEW
	glfw
	"${BOOST_DIR}/stage/lib/libboost_system.a" 
	"${BOOST_DIR}/stage/lib/libboost_filesystem.a"
	)

INCLUDE_DIRECTORIES(
	"${PROJECT_BINARY_DIR}/${THIRD_PARTY_INC_DIR}"
	"${PROJECT_SOURCE_DIR}/modules/core/src"
	"${PROJECT_SOURCE_DIR}/modules/Log/src"
    "${PROJECT_SOURCE_DIR}/modules/utils/src"
	"${PROJECT_SOURCE_DIR}/modules/vfs/src"
	"${PROJECT_SOURCE_DIR}/modules/engine/src"
	"${PROJECT_SOURCE_DIR}/dummy_projects/simple_window/src"
)

#------------------------------------------------------------------------------
# Generando ejecutable de test unitarios
#------------------------------------------------------------------------------
ADD_EXECUTABLE(gl3_poc_orig ${prog_sources})
TARGET_LINK_LIBRARIES(gl3_poc_orig ${PROG_LIBS})
